//
//  YQStatusPictureViewCell.m
//  WeiboOC
//
//  Created by yang on 15/11/20.
//  Copyright © 2015年 yang. All rights reserved.
//

#import "YQStatusPictureViewCell.h"
@interface YQStatusPictureViewCell ()
@property (nonatomic, strong) UIImageView *imageView;
@end
@implementation YQStatusPictureViewCell
-(void)setUrl:(NSURL *)url{
    _url = url;
    [self.imageView sd_setImageWithURL:url placeholderImage:nil];
}
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self setupUI];
    }
    return self;
}
- (void)setupUI{
    [self.contentView addSubview:self.imageView];
    [self.imageView makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self.contentView);
    }];
}
#pragma mark - 懒加载子控件
-(UIImageView *)imageView{
    if (!_imageView) {
        _imageView = [[UIImageView alloc]init];
        _imageView.contentMode = UIViewContentModeScaleAspectFill;
        _imageView.clipsToBounds = YES;
    }
    return _imageView;
}
@end
